#ifndef _UTILS_H_
#define _UTILS_H_

#include <stdlib.h>
#include "cg.h"

void cg_srand(void);
double cg_frand01(void);
double cg_frand(double l, double r);
void cg_random_points(cgPoint *dest, int n, 
		    double xl, double xr,
		    double yl, double yr,
		    double zl, double zr);
void cg_random_lines(cgLine *dest, int n,
		     double xl, double xr,
		     double yl, double yr,
		     double zl, double zr);

void cg_random_triangles(cgTriangle *dest, int n,
			 double xl, double xr,
			 double yl, double yr,
			 double zl, double zr);

void cg_random_grid(cgPoint **dest, int w, int h,
		    double xl, double xr,
		    double yl, double yr,
		    double zl, double zr);

#endif  // _UTILS_H_
